package com.yilin.tms.capital.commons.aliPay;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Column;
import javax.persistence.Version;
import java.util.Date;

public class AliPayTradeRecord {
    public enum AliPayTradeType {
        payment(0, "付款"),
        refund(1, "退款");
        @EnumValue
        public Integer index;
        public String name;

        AliPayTradeType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum UserType {
        shipperUser(0, "货主用户"),
        truckerUser(1, "车主用户");
        @EnumValue
        public Integer index;
        public String name;

        UserType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum AliPayType {
        app(0, "APP支付"),
        web(1, "网页支付");
        @EnumValue
        public Integer index;
        public String name;

        AliPayType(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    public enum  AliPayTradeStatus {
        create(0, "创建"),
        success(1, "交易成功"),
        fail(2, "交易失败"),
        handle(3, "处理中"),
        close(4, "交易关闭"),
        notpay(5, "未支付");
        @EnumValue
        public Integer index;
        public String name;

        AliPayTradeStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }
    private AliPayTradeType aliPayTradeType ;//交易类型
    private AliPayTradeStatus aliPayTradeStatus;//交易状态
    private String tradeName;//交易名称
    private UserType userType;//用户类型
    private AliPayType aliPayType;//付款方式
    private String tradeNo;//本地流水号
    private Date initiateTime;//发起时间
    private Date completeTime;//完成时间
    private Boolean notifiedYilin=false;//是否已通知主服务器
    private Date notifyTime;//通知时间  通知完成时间
    private Date nextNotificationTime = new Date();//下次通知时间  表示为通知的订单下次通知时间
    private Integer syncTaskCount = 0;//自动任务次数
    private String bankFlowNo;//银行流水号（银行/第三方)
    private Double tranAmount;//转出金额  *
    private String outOrganizeId;//付款人[平台]组织ID
    private String outAcctName;//付款人名称*
    private String outAcctNo;//付款人账*
    private String inOrganizeId;//收款人[平台]组织ID
    private String inAcctName;//收款人账户户名 *
    private String inAcctNo;//收款人账户
    private String bankMsg;//银行返回信息
    private String refundOriginalTradeNo;//退款原交易订单号
    private String remark;//退款原交易订单号

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRefundOriginalTradeNo() {
        return refundOriginalTradeNo;
    }

    public void setRefundOriginalTradeNo(String refundOriginalTradeNo) {
        this.refundOriginalTradeNo = refundOriginalTradeNo;
    }

    public AliPayTradeType getAliPayTradeType() {
        return aliPayTradeType;
    }

    public void setAliPayTradeType(AliPayTradeType aliPayTradeType) {
        this.aliPayTradeType = aliPayTradeType;
    }

    public AliPayTradeStatus getAliPayTradeStatus() {
        return aliPayTradeStatus;
    }

    public void setAliPayTradeStatus(AliPayTradeStatus aliPayTradeStatus) {
        this.aliPayTradeStatus = aliPayTradeStatus;
    }

    public String getTradeName() {
        return tradeName;
    }

    public void setTradeName(String tradeName) {
        this.tradeName = tradeName;
    }

    public UserType getUserType() {
        return userType;
    }

    public void setUserType(UserType userType) {
        this.userType = userType;
    }

    public AliPayType getAliPayType() {
        return aliPayType;
    }

    public void setAliPayType(AliPayType aliPayType) {
        this.aliPayType = aliPayType;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public Date getInitiateTime() {
        return initiateTime;
    }

    public void setInitiateTime(Date initiateTime) {
        this.initiateTime = initiateTime;
    }

    public Date getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(Date completeTime) {
        this.completeTime = completeTime;
    }

    public Boolean getNotifiedYilin() {
        return notifiedYilin;
    }

    public void setNotifiedYilin(Boolean notifiedYilin) {
        this.notifiedYilin = notifiedYilin;
    }

    public Date getNotifyTime() {
        return notifyTime;
    }

    public void setNotifyTime(Date notifyTime) {
        this.notifyTime = notifyTime;
    }

    public Date getNextNotificationTime() {
        return nextNotificationTime;
    }

    public void setNextNotificationTime(Date nextNotificationTime) {
        this.nextNotificationTime = nextNotificationTime;
    }

    public Integer getSyncTaskCount() {
        return syncTaskCount;
    }

    public void setSyncTaskCount(Integer syncTaskCount) {
        this.syncTaskCount = syncTaskCount;
    }

    public String getBankFlowNo() {
        return bankFlowNo;
    }

    public void setBankFlowNo(String bankFlowNo) {
        this.bankFlowNo = bankFlowNo;
    }

    public Double getTranAmount() {
        return tranAmount;
    }

    public void setTranAmount(Double tranAmount) {
        this.tranAmount = tranAmount;
    }

    public String getOutOrganizeId() {
        return outOrganizeId;
    }

    public void setOutOrganizeId(String outOrganizeId) {
        this.outOrganizeId = outOrganizeId;
    }

    public String getOutAcctName() {
        return outAcctName;
    }

    public void setOutAcctName(String outAcctName) {
        this.outAcctName = outAcctName;
    }

    public String getOutAcctNo() {
        return outAcctNo;
    }

    public void setOutAcctNo(String outAcctNo) {
        this.outAcctNo = outAcctNo;
    }

    public String getInOrganizeId() {
        return inOrganizeId;
    }

    public void setInOrganizeId(String inOrganizeId) {
        this.inOrganizeId = inOrganizeId;
    }

    public String getInAcctName() {
        return inAcctName;
    }

    public void setInAcctName(String inAcctName) {
        this.inAcctName = inAcctName;
    }

    public String getInAcctNo() {
        return inAcctNo;
    }

    public void setInAcctNo(String inAcctNo) {
        this.inAcctNo = inAcctNo;
    }

    public String getBankMsg() {
        return bankMsg;
    }

    public void setBankMsg(String bankMsg) {
        this.bankMsg = bankMsg;
    }
}
